package cn.blog.bizbase.common;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2018/4/13/013.
 */
public class ResultInfo {
    boolean success;
    Integer code;
    String message;
    Map<String,Object> data;

    public ResultInfo(){}
    public ResultInfo(boolean status){
        this.success = status;
    }
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void setData(String dataName,Object data) {
        Map<String,Object> map = new HashMap<String,Object>();
        map.put(dataName,data);
        this.data = map;
    }
    public void addData(String dataName,Object data){
        this.data.put(dataName,data);
    }
    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }
}
